<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>imageUpload Demo</title>
</head>
<body>
<input id="myinput" type="file" onchange="imageUpload(this)" multiple="multiple">
<div class="images"></div>
<script>
    var images = document.getElementsByClassName("images")[0];
    function imageUpload(file) {
        for(var i=0,f;f=file.files[i];i++){
            var fileRader = new FileReader();
            fileRader.readAsDataURL(f);
            fileRader.onload = function (event) {
                drawPic(event.target.result);
                console.log(event.target.result);
            }
        }
    }
    function drawPic(url) {
        var imageElement = document.createElement("img");
        imageElement.src = url;
        imageElement.style.width = 3 + "rem";
        imageElement.style.height = 3 + "rem";
        images.append(imageElement);
    }
</script>
</body>
</html>